const mongoose = require("mongoose")
// const options = {
//     serverSelectionTimeoutMS: 10000, // 设置服务器选择超时时间
//     socketTimeoutMS: 45000,          // 设置套接字超时时间
// };

mongoose.connect("mongodb+srv://seh2404747256:i6WUsHcTvy8by9L8@2024laosen.nckkhh2.mongodb.net/",{
    connectTimeoutMS: 40000, // 设置连接超时时间为 30 秒
    retryWrites: true,
  })

const coon = mongoose.connection

coon.on("open", () => { 
    console.log('success');
})

coon.on("error", () => {
    console.log("err");
})

module.exports = mongoose